package modelCollection;

import java.util.Set;
import java.util.TreeMap;
import java.util.Vector;

import dataCollection.AbstractDetail;
import dataCollection.AbstractDetailTreeAlgorithms;
import dataCollection.Aptitude;
import dataCollection.Concentration;
import dataCollection.InvalidDetailException;
import dataCollection.Trait;
import dataCollection.Tree;

public class Model {
  private Character char_;
  private Tree<AbstractDetail> ability_tree_;

  public Model() {
    ability_tree_ = new Tree<AbstractDetail>();
    XMLTraitsReader.readTraits(ability_tree_);
    XMLAptitudesReader.readApts(ability_tree_);
    XMLConcentrationsReader.readApts(ability_tree_);
    AbstractDetailTreeAlgorithms.dumpTreeToDot(ability_tree_);
    char_ = new Character(ability_tree_);
  }
/*
  public Trait getTrait(String name) throws InvalidDetailException {
    for(int i = 0; i < traits_.size(); ++i) {
      if(traits_.elementAt(i).getName().equals(name)) 
        return traits_.elementAt(i);
    }
    throw new InvalidDetailException();
  }
*/ 
  public Tree<AbstractDetail> getTree() {
    return ability_tree_;
  }
  
  public Character getChar() {
    return char_;
  }
}
